var status = -1;
var selectionLog = new Array();
function start() {
    action(1, 0, 0)
}
function action(d, c, b) {
    if (!im.getServerName().equals("BMS冒险岛") && !im.getServerName().equals("BMS至尊体验服")) {
        im.playerMessage(1, " 使用环境异常，请还原服务端配置。");
        im.dispose();
        return
    }
    if (status == 0 && d == 0) {
        im.dispose();
        return
    }
    (d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        im.dispose()
    } else {
        if (status === a++) {
            im.sendOk("现在发放的#b5个最高级贝勒德饰品#k，他们分别是：高贝戒指、顶贝戒指、顶贝耳环和2个顶贝吊坠，谢谢惠顾！", 0, 9010000)
        } else {
            if (status === a++) {
                im.dispose();
                im.gainItem(2631761, -1);
				im.gainItem(1113074, 1);
                im.gainItem(1113075, 1);
				im.gainItem(1122267, 1);
                im.gainItem(1122267, 1);
                im.gainItem(1032223, 1)
            }
        }
    }
};
